Optimal. Leaf size=50 \[ \frac{\tan ^3(c+d x)}{3 a d}-\frac{\sec ^3(c+d x)}{3 a d}+\frac{\sec (c+d x)}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0876481, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {2706, 2607, 30, 2606} \[ \frac{\tan ^3(c+d x)}{3 a d}-\frac{\sec ^3(c+d x)}{3 a d}+\frac{\sec (c+d x)}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2706
Rule 2607
Rule 30
Rule 2606
Rubi steps
\begin{align*} \int \frac{\tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac{\int \sec ^2(c+d x) \tan ^2(c+d x) \, dx}{a}-\frac{\int \sec (c+d x) \tan ^3(c+d x) \, dx}{a}\\ &=\frac{\operatorname{Subst}\left (\int x^2 \, dx,x,\tan (c+d x)\right )}{a d}-\frac{\operatorname{Subst}\left (\int \left (-1+x^2\right ) \, dx,x,\sec (c+d x)\right )}{a d}\\ &=\frac{\sec (c+d x)}{a d}-\frac{\sec ^3(c+d x)}{3 a d}+\frac{\tan ^3(c+d x)}{3 a d}\\ \end{align*}
Mathematica [B] time = 0.164187, size = 106, normalized size = 2.12 \[ \frac{8 \sin (c+d x)-5 \sin (2 (c+d x))-10 \cos (c+d x)+2 \cos (2 (c+d x))+6}{12 a d (\sin (c+d x)+1) \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right ) \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.047, size = 70, normalized size = 1.4 \begin{align*} 8\,{\frac{1}{da} \left ( -1/16\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -1 \right ) ^{-1}-1/12\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) ^{-3}+1/8\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) ^{-2}+1/16\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) ^{-1} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.09485, size = 122, normalized size = 2.44 \begin{align*} \frac{4 \,{\left (\frac{2 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}}{3 \,{\left (a + \frac{2 \, a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{2 \, a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac{a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.37095, size = 127, normalized size = 2.54 \begin{align*} \frac{\cos \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) + 1}{3 \,{\left (a d \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a d \cos \left (d x + c\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\tan ^{2}{\left (c + d x \right )}}{\sin{\left (c + d x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.65929, size = 92, normalized size = 1.84 \begin{align*} -\frac{\frac{3}{a{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1\right )}} - \frac{3 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 12 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 5}{a{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1\right )}^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]